package router

import (
	"github.com/gin-gonic/gin"
	"goods_bff/controller"
)

func InitRouter() *gin.Engine {
	router := gin.Default()
	router.GET("/goods/list/by_hot", controller.GoodsListByHot) //根据浏览量查询
	router.GET("/goods/list", controller.GoodsList)             //es搜索
	router.GET("/goods/detail", controller.GoodsDetail)         //商品详情
	router.POST("/create/comments", controller.CreateComment)   //添加评论
	router.POST("/add/shopping", controller.AddShopping)        //添加购物车
	return router
}
